package com.wanho.java157.SystemSetting.service.impl;

import com.wanho.java157.SystemSetting.mapper.EmployeeMapper;
import com.wanho.java157.SystemSetting.po.Employee;
import com.wanho.java157.SystemSetting.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServiceImpl implements EmployeeService {

    @Autowired
    private EmployeeMapper employeeMapper;

    @Override
    public Employee selectEmployeeByEmployeeId(String employeeId) {
        return employeeMapper.selectEmployeeByEmployeeId(employeeId);
    }

    @Override
    public List<Employee> selectAllEmployee() {
        return employeeMapper.selectAllEmployee();
    }

    @Override
    public List<Employee> selectEmployeeAmbiguousName(String employeeId, String employeeName) {
        return employeeMapper.selectEmployeeAmbiguousName("%" + employeeId + "%","%" + employeeName + "%");
    }
}
